@use 'sass:meta' as *;
@use 'mixins' as *;

@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,600..800;1,600..800&display=swap');

:root {
  --ifm-color-primary: #ff4e8c;
  --ifm-color-primary-dark: #ff5286;
  --ifm-color-primary-darker: #ff3f7f;
  --ifm-color-primary-darkest: #ff076a;
  --ifm-color-primary-light: #ff9cd2;
  --ifm-color-primary-lighter: #ffafda;
  --ifm-color-primary-lightest: #ffafcb;
  --docusaurus-highlighted-code-line-bg: #150c122b;
  --ifm-table-stripe-background: #a03066 !important;
  --ifm-table-background: transparent !important;
}

[data-theme] {
  blockquote {
    font-size: 0.9rem;
  }
}

table {
  thead {
    background-color: #09090b;

    th {
      border-color: #363663;
    }

    tr {
      border-bottom-color: #363663;
    }
  }

  tbody {
    td {
      border-color: #363663;
    }

    tr:nth-child(1n) {
      background-color: #161627;
    }

    tr:nth-child(2n) {
      background-color: #10101c;
    }
  }
}

.theme-code-block-highlighted-line {
  opacity: 0.5;
  font-style: italic;
  font-size: 0.8rem;
  background-color: unset !important;
}

ul li {
  svg {
    &.warn {
      stroke: #e4346c;
    }
  }
}

code[class*='language-'],
pre[class*='language-'] {
  font-size: 0.85em;

  .token {
    &.comment {
      font-size: 0.9em;
      font-style: normal !important;
    }
  }
}

.navbar__brand {
  margin-right: 0;
}

.navbar__manual--title {
  padding: 0;
  margin-right: 1rem;
  font-weight: bold;
  color: #ffffff;
}

.navbar.navbar--fixed-top {
  .navbar__item.dropdown.dropdown--hoverable {
    svg {
      display: none;
    }
  }
}

.navbar__logo {
  width: 1.2rem;
  height: 1.2rem;
}

.title-section {
  @include flex(row, flex-start, space-between);
  gap: 2.5rem;
}

.header-github-link,
.header-sponsor-link {
  width: 32px;
  height: 32px;
  padding: 6px;
  margin-right: 2px;
  border-radius: 50%;
  transition: background-color var(--ifm-transition-fast);

  &:hover {
    background: var(--ifm-color-emphasis-200);
  }
}

.header-github-link:before {
  content: '';
  height: 100%;
  display: block;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4"/><path d="M9 18c-4.51 2-5-2-7-2"/></svg>')
    no-repeat;
}

.header-sponsor-link:before {
  content: '';
  height: 100%;
  display: block;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z"/></svg>')
    no-repeat;
}

html[data-theme='dark'] {
  background-color: #161927;
  color: #b9bfdc;

  hr {
    background-color: #303364;
  }

  blockquote {
    color: #8188ab;
  }

  .navbar.navbar--fixed-top {
    background-color: #242742;
  }

  .navbar__manual--title {
    color: var(--ifm-color-primary);

    &:hover {
      color: var(--ifm-color-primary);
    }
  }

  .header-github-link:before {
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4"/><path d="M9 18c-4.51 2-5-2-7-2"/></svg>')
      no-repeat;
  }

  .header-sponsor-link:before {
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z"/></svg>')
      no-repeat;
  }

  article {
    a {
      &.card {
        background-color: #2c2e40;
      }
    }
  }

  .tabs__item--active {
    border-bottom-color: #872f61;
    color: #f271bb;
  }

  .theme-admonition {
    p {
      & > code {
        background-color: rgba(255, 255, 255, 0.1);
        border: none;
        padding-inline: 5px;
        font-weight: 600;
      }
    }

    pre {
      code {
        background-color: #14161f;
      }
    }

    &.alert--success {
      --ifm-alert-background-color: #7230d6;
      --ifm-alert-border-color: #b27fff;
    }

    &.alert--info {
      --ifm-alert-background-color: #2c2f44;
      --ifm-alert-border-color: #656b94;
    }

    &.alert--secondary {
      --ifm-alert-background-color: #292e55;
      --ifm-alert-border-color: #5d72ff;
    }

    &.alert--danger {
      --ifm-alert-background-color: #540218;
      --ifm-alert-border-color: #ff0043;
    }
  }
}

.theme-doc-sidebar-container {
  font-size: 0.9rem;

  .menu__caret {
    &::before {
      width: 0.7rem;
      height: 0.7rem;
      opacity: 0.5;
    }
  }
}

.theme-doc-version-badge.badge.badge--secondary {
  margin-bottom: 20px;
}

// Components
@include load-css('loading');
@include load-css('faq');
@include load-css('personal');
@include load-css('history');
@include load-css('stability/main');
